//
//  XDMyInviteCell.m
//  xindailianmeng
//
//  Created by 张东 on 2017/3/15.
//  Copyright © 2017年 xindailianmeng.cn. All rights reserved.
//

#import "XDMyInviteCell.h"
#import "XDMyInviteModel.h"
@interface XDMyInviteCell ()


@property (weak, nonatomic) IBOutlet UILabel *rownoLb;

@property (weak, nonatomic) IBOutlet UILabel *realNameLb;


@property (weak, nonatomic) IBOutlet UILabel *mobileLb;


@property (weak, nonatomic) IBOutlet UILabel *ctimeLb;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *realNameConstraint;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *mobileConstraint;

@end


@implementation XDMyInviteCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
     
        self = [[NSBundle mainBundle]  loadNibNamed:@"XDMyInviteCell" owner:self options:nil].firstObject;
    }
    return self;
}

- (void)setModel:(XDMyInviteModel *)model {
    _model = model;
    
    self.rownoLb.text = [NSString stringWithFormat:@"%zd", model.rowno];
    
    self.realNameLb.text = model.realName ? model.realName : @"**";
    
    self.mobileLb.text = model.mobile;
    
    self.ctimeLb.text = model.ctime;
}

- (void)layoutSubviews {
    
    self.realNameConstraint.constant = 80 * kscaleW;
    
    self.mobileConstraint.constant = 140 * kscaleW;
}
@end
